/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'central';
  
  checkConfig(config);
  @endpoint = getEndpoint('aiccs', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model Apply400ManagerIdentifyRequest {
  empowerment?: string(name='Empowerment'),
  managerCertEffDate?: string(name='ManagerCertEffDate'),
  managerCertExpDate?: string(name='ManagerCertExpDate'),
  managerCertNumber?: string(name='ManagerCertNumber'),
  managerCertPic?: string(name='ManagerCertPic'),
  managerCertType?: string(name='ManagerCertType'),
  managerMobilePhone?: string(name='ManagerMobilePhone'),
  managerName?: string(name='ManagerName'),
  number?: string(name='Number'),
  oldOrderId?: long(name='OldOrderId'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  supplementaryMaterial?: string(name='SupplementaryMaterial'),
  unifiedstandardAgreement?: string(name='UnifiedstandardAgreement'),
  wttorderId?: string(name='WttorderId'),
}

model Apply400ManagerIdentifyResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model Apply400ManagerIdentifyResponse = {
  headers: map[string]string(name='headers'),
  body: Apply400ManagerIdentifyResponseBody(name='body'),
}

async function apply400ManagerIdentifyWithOptions(request: Apply400ManagerIdentifyRequest, runtime: Util.RuntimeOptions): Apply400ManagerIdentifyResponse {
  Util.validateModel(request);
  var query = {};
  query['Empowerment'] = request.empowerment;
  query['ManagerCertEffDate'] = request.managerCertEffDate;
  query['ManagerCertExpDate'] = request.managerCertExpDate;
  query['ManagerCertNumber'] = request.managerCertNumber;
  query['ManagerCertPic'] = request.managerCertPic;
  query['ManagerCertType'] = request.managerCertType;
  query['ManagerMobilePhone'] = request.managerMobilePhone;
  query['ManagerName'] = request.managerName;
  query['Number'] = request.number;
  query['OldOrderId'] = request.oldOrderId;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SupplementaryMaterial'] = request.supplementaryMaterial;
  query['UnifiedstandardAgreement'] = request.unifiedstandardAgreement;
  query['WttorderId'] = request.wttorderId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'Apply400ManagerIdentify',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function apply400ManagerIdentify(request: Apply400ManagerIdentifyRequest): Apply400ManagerIdentifyResponse {
  var runtime = new Util.RuntimeOptions{};
  return apply400ManagerIdentifyWithOptions(request, runtime);
}

model Apply400QualificationRequest {
  applyRemark?: string(name='ApplyRemark'),
  businessLicensePic?: string(name='BusinessLicensePic'),
  corpCertNumber?: string(name='CorpCertNumber'),
  corpCertType?: string(name='CorpCertType'),
  corpName?: string(name='CorpName'),
  corpNumber?: string(name='CorpNumber'),
  corpRegisteredAddrArea?: string(name='CorpRegisteredAddrArea'),
  corpRegisteredAddrCity?: string(name='CorpRegisteredAddrCity'),
  corpRegisteredAddrDetail?: string(name='CorpRegisteredAddrDetail'),
  corpRegisteredAddrProv?: string(name='CorpRegisteredAddrProv'),
  corpRegisteredEffDate?: string(name='CorpRegisteredEffDate'),
  corpRegisteredExpDate?: string(name='CorpRegisteredExpDate'),
  legalPersonCertEffDate?: string(name='LegalPersonCertEffDate'),
  legalPersonCertExpDate?: string(name='LegalPersonCertExpDate'),
  legalPersonCertNumber?: string(name='LegalPersonCertNumber'),
  legalPersonCertPic?: string(name='LegalPersonCertPic'),
  legalPersonCertType?: string(name='LegalPersonCertType'),
  legalPersonName?: string(name='LegalPersonName'),
  legalPersonPhoneNumber?: string(name='LegalPersonPhoneNumber'),
  oldOrderId?: long(name='OldOrderId'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  specId?: long(name='SpecId'),
  specIdArray?: string(name='SpecIdArray'),
}

model Apply400QualificationResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model Apply400QualificationResponse = {
  headers: map[string]string(name='headers'),
  body: Apply400QualificationResponseBody(name='body'),
}

async function apply400QualificationWithOptions(request: Apply400QualificationRequest, runtime: Util.RuntimeOptions): Apply400QualificationResponse {
  Util.validateModel(request);
  var query = {};
  query['ApplyRemark'] = request.applyRemark;
  query['BusinessLicensePic'] = request.businessLicensePic;
  query['CorpCertNumber'] = request.corpCertNumber;
  query['CorpCertType'] = request.corpCertType;
  query['CorpName'] = request.corpName;
  query['CorpNumber'] = request.corpNumber;
  query['CorpRegisteredAddrArea'] = request.corpRegisteredAddrArea;
  query['CorpRegisteredAddrCity'] = request.corpRegisteredAddrCity;
  query['CorpRegisteredAddrDetail'] = request.corpRegisteredAddrDetail;
  query['CorpRegisteredAddrProv'] = request.corpRegisteredAddrProv;
  query['CorpRegisteredEffDate'] = request.corpRegisteredEffDate;
  query['CorpRegisteredExpDate'] = request.corpRegisteredExpDate;
  query['LegalPersonCertEffDate'] = request.legalPersonCertEffDate;
  query['LegalPersonCertExpDate'] = request.legalPersonCertExpDate;
  query['LegalPersonCertNumber'] = request.legalPersonCertNumber;
  query['LegalPersonCertPic'] = request.legalPersonCertPic;
  query['LegalPersonCertType'] = request.legalPersonCertType;
  query['LegalPersonName'] = request.legalPersonName;
  query['LegalPersonPhoneNumber'] = request.legalPersonPhoneNumber;
  query['OldOrderId'] = request.oldOrderId;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SpecId'] = request.specId;
  query['SpecIdArray'] = request.specIdArray;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'Apply400Qualification',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function apply400Qualification(request: Apply400QualificationRequest): Apply400QualificationResponse {
  var runtime = new Util.RuntimeOptions{};
  return apply400QualificationWithOptions(request, runtime);
}

model ApplyDownloadQualificationsRequest {
  corpName?: string(name='CorpName'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  qualificationType?: int32(name='QualificationType'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  specId?: long(name='specId'),
}

model ApplyDownloadQualificationsResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model ApplyDownloadQualificationsResponse = {
  headers: map[string]string(name='headers'),
  body: ApplyDownloadQualificationsResponseBody(name='body'),
}

async function applyDownloadQualificationsWithOptions(request: ApplyDownloadQualificationsRequest, runtime: Util.RuntimeOptions): ApplyDownloadQualificationsResponse {
  Util.validateModel(request);
  var query = {};
  query['CorpName'] = request.corpName;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['QualificationType'] = request.qualificationType;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['specId'] = request.specId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ApplyDownloadQualifications',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function applyDownloadQualifications(request: ApplyDownloadQualificationsRequest): ApplyDownloadQualificationsResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyDownloadQualificationsWithOptions(request, runtime);
}

model ApplyExpandSpecRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ApplyExpandSpecResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model ApplyExpandSpecResponse = {
  headers: map[string]string(name='headers'),
  body: ApplyExpandSpecResponseBody(name='body'),
}

async function applyExpandSpecWithOptions(request: ApplyExpandSpecRequest, runtime: Util.RuntimeOptions): ApplyExpandSpecResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ApplyExpandSpec',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function applyExpandSpec(request: ApplyExpandSpecRequest): ApplyExpandSpecResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyExpandSpecWithOptions(request, runtime);
}

model ApplyProcedureSceneRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ApplyProcedureSceneResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model ApplyProcedureSceneResponse = {
  headers: map[string]string(name='headers'),
  body: ApplyProcedureSceneResponseBody(name='body'),
}

async function applyProcedureSceneWithOptions(request: ApplyProcedureSceneRequest, runtime: Util.RuntimeOptions): ApplyProcedureSceneResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ApplyProcedureScene',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function applyProcedureScene(request: ApplyProcedureSceneRequest): ApplyProcedureSceneResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyProcedureSceneWithOptions(request, runtime);
}

model ApplyQualificationRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ApplyQualificationResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model ApplyQualificationResponse = {
  headers: map[string]string(name='headers'),
  body: ApplyQualificationResponseBody(name='body'),
}

async function applyQualificationWithOptions(request: ApplyQualificationRequest, runtime: Util.RuntimeOptions): ApplyQualificationResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ApplyQualification',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function applyQualification(request: ApplyQualificationRequest): ApplyQualificationResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyQualificationWithOptions(request, runtime);
}

model ApplyUpgradeNumberRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ApplyUpgradeNumberResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model ApplyUpgradeNumberResponse = {
  headers: map[string]string(name='headers'),
  body: ApplyUpgradeNumberResponseBody(name='body'),
}

async function applyUpgradeNumberWithOptions(request: ApplyUpgradeNumberRequest, runtime: Util.RuntimeOptions): ApplyUpgradeNumberResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ApplyUpgradeNumber',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function applyUpgradeNumber(request: ApplyUpgradeNumberRequest): ApplyUpgradeNumberResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyUpgradeNumberWithOptions(request, runtime);
}

model Buy400NumberRequest {
  corpName?: string(name='CorpName'),
  guaranteedPackageLevel?: string(name='GuaranteedPackageLevel'),
  monthlyPrice?: string(name='MonthlyPrice'),
  number?: string(name='Number'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  realNameInsId?: string(name='RealNameInsId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  specId?: string(name='SpecId'),
}

model Buy400NumberResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model Buy400NumberResponse = {
  headers: map[string]string(name='headers'),
  body: Buy400NumberResponseBody(name='body'),
}

async function buy400NumberWithOptions(request: Buy400NumberRequest, runtime: Util.RuntimeOptions): Buy400NumberResponse {
  Util.validateModel(request);
  var query = {};
  query['CorpName'] = request.corpName;
  query['GuaranteedPackageLevel'] = request.guaranteedPackageLevel;
  query['MonthlyPrice'] = request.monthlyPrice;
  query['Number'] = request.number;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['RealNameInsId'] = request.realNameInsId;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SpecId'] = request.specId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'Buy400Number',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function buy400Number(request: Buy400NumberRequest): Buy400NumberResponse {
  var runtime = new Util.RuntimeOptions{};
  return buy400NumberWithOptions(request, runtime);
}

model BuyNumberRequest {
  corpName?: string(name='CorpName'),
  guaranteedPackageLevel?: int32(name='GuaranteedPackageLevel'),
  isCuteNumber?: boolean(name='IsCuteNumber'),
  levelId?: int32(name='LevelId'),
  monthlyPrice?: string(name='MonthlyPrice'),
  numberArray?: string(name='NumberArray'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  realNameInsId?: long(name='RealNameInsId'),
  regionNameCity?: string(name='RegionNameCity'),
  regionNameProvince?: string(name='RegionNameProvince'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  specId?: long(name='SpecId'),
}

model BuyNumberResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model BuyNumberResponse = {
  headers: map[string]string(name='headers'),
  body: BuyNumberResponseBody(name='body'),
}

async function buyNumberWithOptions(request: BuyNumberRequest, runtime: Util.RuntimeOptions): BuyNumberResponse {
  Util.validateModel(request);
  var query = {};
  query['CorpName'] = request.corpName;
  query['GuaranteedPackageLevel'] = request.guaranteedPackageLevel;
  query['IsCuteNumber'] = request.isCuteNumber;
  query['LevelId'] = request.levelId;
  query['MonthlyPrice'] = request.monthlyPrice;
  query['NumberArray'] = request.numberArray;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['RealNameInsId'] = request.realNameInsId;
  query['RegionNameCity'] = request.regionNameCity;
  query['RegionNameProvince'] = request.regionNameProvince;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SpecId'] = request.specId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'BuyNumber',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function buyNumber(request: BuyNumberRequest): BuyNumberResponse {
  var runtime = new Util.RuntimeOptions{};
  return buyNumberWithOptions(request, runtime);
}

model CheckRamAuthRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model CheckRamAuthResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model CheckRamAuthResponse = {
  headers: map[string]string(name='headers'),
  body: CheckRamAuthResponseBody(name='body'),
}

async function checkRamAuthWithOptions(request: CheckRamAuthRequest, runtime: Util.RuntimeOptions): CheckRamAuthResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CheckRamAuth',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function checkRamAuth(request: CheckRamAuthRequest): CheckRamAuthResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkRamAuthWithOptions(request, runtime);
}

model CountNormalCorpIdentifyRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model CountNormalCorpIdentifyResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model CountNormalCorpIdentifyResponse = {
  headers: map[string]string(name='headers'),
  body: CountNormalCorpIdentifyResponseBody(name='body'),
}

async function countNormalCorpIdentifyWithOptions(request: CountNormalCorpIdentifyRequest, runtime: Util.RuntimeOptions): CountNormalCorpIdentifyResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CountNormalCorpIdentify',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function countNormalCorpIdentify(request: CountNormalCorpIdentifyRequest): CountNormalCorpIdentifyResponse {
  var runtime = new Util.RuntimeOptions{};
  return countNormalCorpIdentifyWithOptions(request, runtime);
}

model CreateAccountRequest {
  accountName?: string(name='AccountName'),
  email?: string(name='Email'),
  id?: long(name='Id'),
  ownerId?: long(name='OwnerId'),
  personName?: string(name='PersonName'),
  phone?: string(name='Phone'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model CreateAccountResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model CreateAccountResponse = {
  headers: map[string]string(name='headers'),
  body: CreateAccountResponseBody(name='body'),
}

async function createAccountWithOptions(request: CreateAccountRequest, runtime: Util.RuntimeOptions): CreateAccountResponse {
  Util.validateModel(request);
  var query = {};
  query['AccountName'] = request.accountName;
  query['Email'] = request.email;
  query['Id'] = request.id;
  query['OwnerId'] = request.ownerId;
  query['PersonName'] = request.personName;
  query['Phone'] = request.phone;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateAccount',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createAccount(request: CreateAccountRequest): CreateAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAccountWithOptions(request, runtime);
}

model CreateAiccsInstanceRequest {
  accountIds?: string(name='AccountIds'),
  id?: long(name='Id'),
  instanceCode?: string(name='InstanceCode'),
  instanceName?: string(name='InstanceName'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  remark?: string(name='Remark'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  viewUrl?: string(name='ViewUrl'),
}

model CreateAiccsInstanceResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model CreateAiccsInstanceResponse = {
  headers: map[string]string(name='headers'),
  body: CreateAiccsInstanceResponseBody(name='body'),
}

async function createAiccsInstanceWithOptions(request: CreateAiccsInstanceRequest, runtime: Util.RuntimeOptions): CreateAiccsInstanceResponse {
  Util.validateModel(request);
  var query = {};
  query['AccountIds'] = request.accountIds;
  query['Id'] = request.id;
  query['InstanceCode'] = request.instanceCode;
  query['InstanceName'] = request.instanceName;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['Remark'] = request.remark;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['ViewUrl'] = request.viewUrl;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateAiccsInstance',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createAiccsInstance(request: CreateAiccsInstanceRequest): CreateAiccsInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAiccsInstanceWithOptions(request, runtime);
}

model CreateOuterCallCenterDataRequest {
  bizId?: string(name='BizId'),
  bizType?: string(name='BizType'),
  callType?: string(name='CallType'),
  endReason?: string(name='EndReason'),
  extInfo?: string(name='ExtInfo'),
  fromPhoneNum?: string(name='FromPhoneNum'),
  instanceId?: string(name='InstanceId'),
  interveneTime?: string(name='InterveneTime'),
  recordUrl?: string(name='RecordUrl'),
  sessionId?: string(name='SessionId'),
  tenantId?: string(name='TenantId'),
  toPhoneNum?: string(name='ToPhoneNum'),
  userInfo?: string(name='UserInfo'),
}

model CreateOuterCallCenterDataResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: long(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CreateOuterCallCenterDataResponse = {
  headers: map[string]string(name='headers'),
  body: CreateOuterCallCenterDataResponseBody(name='body'),
}

async function createOuterCallCenterDataWithOptions(request: CreateOuterCallCenterDataRequest, runtime: Util.RuntimeOptions): CreateOuterCallCenterDataResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateOuterCallCenterData',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createOuterCallCenterData(request: CreateOuterCallCenterDataRequest): CreateOuterCallCenterDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return createOuterCallCenterDataWithOptions(request, runtime);
}

model Delete400QualificationRequest {
  orderIds?: string(name='OrderIds'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model Delete400QualificationResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model Delete400QualificationResponse = {
  headers: map[string]string(name='headers'),
  body: Delete400QualificationResponseBody(name='body'),
}

async function delete400QualificationWithOptions(request: Delete400QualificationRequest, runtime: Util.RuntimeOptions): Delete400QualificationResponse {
  Util.validateModel(request);
  var query = {};
  query['OrderIds'] = request.orderIds;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'Delete400Qualification',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function delete400Qualification(request: Delete400QualificationRequest): Delete400QualificationResponse {
  var runtime = new Util.RuntimeOptions{};
  return delete400QualificationWithOptions(request, runtime);
}

model Destory400NumberRequest {
  number?: string(name='Number'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  realNameInsId?: long(name='RealNameInsId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model Destory400NumberResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model Destory400NumberResponse = {
  headers: map[string]string(name='headers'),
  body: Destory400NumberResponseBody(name='body'),
}

async function destory400NumberWithOptions(request: Destory400NumberRequest, runtime: Util.RuntimeOptions): Destory400NumberResponse {
  Util.validateModel(request);
  var query = {};
  query['Number'] = request.number;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['RealNameInsId'] = request.realNameInsId;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'Destory400Number',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function destory400Number(request: Destory400NumberRequest): Destory400NumberResponse {
  var runtime = new Util.RuntimeOptions{};
  return destory400NumberWithOptions(request, runtime);
}

model DestoryNumberRequest {
  number?: string(name='Number'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  realNameInsId?: long(name='RealNameInsId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DestoryNumberResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model DestoryNumberResponse = {
  headers: map[string]string(name='headers'),
  body: DestoryNumberResponseBody(name='body'),
}

async function destoryNumberWithOptions(request: DestoryNumberRequest, runtime: Util.RuntimeOptions): DestoryNumberResponse {
  Util.validateModel(request);
  var query = {};
  query['Number'] = request.number;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['RealNameInsId'] = request.realNameInsId;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DestoryNumber',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function destoryNumber(request: DestoryNumberRequest): DestoryNumberResponse {
  var runtime = new Util.RuntimeOptions{};
  return destoryNumberWithOptions(request, runtime);
}

model DownloadCallCostDetailRequest {
  billCycle?: string(name='BillCycle'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DownloadCallCostDetailResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model DownloadCallCostDetailResponse = {
  headers: map[string]string(name='headers'),
  body: DownloadCallCostDetailResponseBody(name='body'),
}

async function downloadCallCostDetailWithOptions(request: DownloadCallCostDetailRequest, runtime: Util.RuntimeOptions): DownloadCallCostDetailResponse {
  Util.validateModel(request);
  var query = {};
  query['BillCycle'] = request.billCycle;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DownloadCallCostDetail',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function downloadCallCostDetail(request: DownloadCallCostDetailRequest): DownloadCallCostDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return downloadCallCostDetailWithOptions(request, runtime);
}

model Get400CorpPdfOssUrlRequest {
  managerCertEffDate?: string(name='ManagerCertEffDate'),
  managerCertExpDate?: string(name='ManagerCertExpDate'),
  managerCertNumber?: string(name='ManagerCertNumber'),
  managerCertPic?: string(name='ManagerCertPic'),
  managerCertType?: string(name='ManagerCertType'),
  managerMobilePhone?: string(name='ManagerMobilePhone'),
  managerName?: string(name='ManagerName'),
  number?: string(name='Number'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model Get400CorpPdfOssUrlResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model Get400CorpPdfOssUrlResponse = {
  headers: map[string]string(name='headers'),
  body: Get400CorpPdfOssUrlResponseBody(name='body'),
}

async function get400CorpPdfOssUrlWithOptions(request: Get400CorpPdfOssUrlRequest, runtime: Util.RuntimeOptions): Get400CorpPdfOssUrlResponse {
  Util.validateModel(request);
  var query = {};
  query['ManagerCertEffDate'] = request.managerCertEffDate;
  query['ManagerCertExpDate'] = request.managerCertExpDate;
  query['ManagerCertNumber'] = request.managerCertNumber;
  query['ManagerCertPic'] = request.managerCertPic;
  query['ManagerCertType'] = request.managerCertType;
  query['ManagerMobilePhone'] = request.managerMobilePhone;
  query['ManagerName'] = request.managerName;
  query['Number'] = request.number;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'Get400CorpPdfOssUrl',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function get400CorpPdfOssUrl(request: Get400CorpPdfOssUrlRequest): Get400CorpPdfOssUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return get400CorpPdfOssUrlWithOptions(request, runtime);
}

model GetHotlineSessionIdRequest {
  accountName?: string(name='AccountName'),
  calledNumber?: string(name='CalledNumber'),
  callingNumber?: string(name='CallingNumber'),
  instanceId?: string(name='InstanceId'),
}

model GetHotlineSessionIdResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model GetHotlineSessionIdResponse = {
  headers: map[string]string(name='headers'),
  body: GetHotlineSessionIdResponseBody(name='body'),
}

async function getHotlineSessionIdWithOptions(request: GetHotlineSessionIdRequest, runtime: Util.RuntimeOptions): GetHotlineSessionIdResponse {
  Util.validateModel(request);
  var query = {};
  query['AccountName'] = request.accountName;
  query['CalledNumber'] = request.calledNumber;
  query['CallingNumber'] = request.callingNumber;
  query['InstanceId'] = request.instanceId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetHotlineSessionId',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getHotlineSessionId(request: GetHotlineSessionIdRequest): GetHotlineSessionIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getHotlineSessionIdWithOptions(request, runtime);
}

model GetLast400MangerIdentifyRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model GetLast400MangerIdentifyResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetLast400MangerIdentifyResponse = {
  headers: map[string]string(name='headers'),
  body: GetLast400MangerIdentifyResponseBody(name='body'),
}

async function getLast400MangerIdentifyWithOptions(request: GetLast400MangerIdentifyRequest, runtime: Util.RuntimeOptions): GetLast400MangerIdentifyResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetLast400MangerIdentify',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getLast400MangerIdentify(request: GetLast400MangerIdentifyRequest): GetLast400MangerIdentifyResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLast400MangerIdentifyWithOptions(request, runtime);
}

model IsOpenAiccsRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model IsOpenAiccsResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model IsOpenAiccsResponse = {
  headers: map[string]string(name='headers'),
  body: IsOpenAiccsResponseBody(name='body'),
}

async function isOpenAiccsWithOptions(request: IsOpenAiccsRequest, runtime: Util.RuntimeOptions): IsOpenAiccsResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'IsOpenAiccs',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function isOpenAiccs(request: IsOpenAiccsRequest): IsOpenAiccsResponse {
  var runtime = new Util.RuntimeOptions{};
  return isOpenAiccsWithOptions(request, runtime);
}

model OpenAiccsRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model OpenAiccsResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model OpenAiccsResponse = {
  headers: map[string]string(name='headers'),
  body: OpenAiccsResponseBody(name='body'),
}

async function openAiccsWithOptions(request: OpenAiccsRequest, runtime: Util.RuntimeOptions): OpenAiccsResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'OpenAiccs',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function openAiccs(request: OpenAiccsRequest): OpenAiccsResponse {
  var runtime = new Util.RuntimeOptions{};
  return openAiccsWithOptions(request, runtime);
}

model Query400NumberManagerIdentifyDetailRequest {
  orderId?: long(name='OrderId'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model Query400NumberManagerIdentifyDetailResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model Query400NumberManagerIdentifyDetailResponse = {
  headers: map[string]string(name='headers'),
  body: Query400NumberManagerIdentifyDetailResponseBody(name='body'),
}

async function query400NumberManagerIdentifyDetailWithOptions(request: Query400NumberManagerIdentifyDetailRequest, runtime: Util.RuntimeOptions): Query400NumberManagerIdentifyDetailResponse {
  Util.validateModel(request);
  var query = {};
  query['OrderId'] = request.orderId;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'Query400NumberManagerIdentifyDetail',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function query400NumberManagerIdentifyDetail(request: Query400NumberManagerIdentifyDetailRequest): Query400NumberManagerIdentifyDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return query400NumberManagerIdentifyDetailWithOptions(request, runtime);
}

model Query400QualificationDetailRequest {
  orderId?: long(name='OrderId'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model Query400QualificationDetailResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model Query400QualificationDetailResponse = {
  headers: map[string]string(name='headers'),
  body: Query400QualificationDetailResponseBody(name='body'),
}

async function query400QualificationDetailWithOptions(request: Query400QualificationDetailRequest, runtime: Util.RuntimeOptions): Query400QualificationDetailResponse {
  Util.validateModel(request);
  var query = {};
  query['OrderId'] = request.orderId;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'Query400QualificationDetail',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function query400QualificationDetail(request: Query400QualificationDetailRequest): Query400QualificationDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return query400QualificationDetailWithOptions(request, runtime);
}

model Query400QualificationListRequest {
  auditState?: string(name='AuditState'),
  corpName?: string(name='CorpName'),
  ownerId?: long(name='OwnerId'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model Query400QualificationListResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model Query400QualificationListResponse = {
  headers: map[string]string(name='headers'),
  body: Query400QualificationListResponseBody(name='body'),
}

async function query400QualificationListWithOptions(request: Query400QualificationListRequest, runtime: Util.RuntimeOptions): Query400QualificationListResponse {
  Util.validateModel(request);
  var query = {};
  query['AuditState'] = request.auditState;
  query['CorpName'] = request.corpName;
  query['OwnerId'] = request.ownerId;
  query['PageNo'] = request.pageNo;
  query['PageSize'] = request.pageSize;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'Query400QualificationList',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function query400QualificationList(request: Query400QualificationListRequest): Query400QualificationListResponse {
  var runtime = new Util.RuntimeOptions{};
  return query400QualificationListWithOptions(request, runtime);
}

model Query400RealNameListRequest {
  ownerId?: long(name='OwnerId'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model Query400RealNameListResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model Query400RealNameListResponse = {
  headers: map[string]string(name='headers'),
  body: Query400RealNameListResponseBody(name='body'),
}

async function query400RealNameListWithOptions(request: Query400RealNameListRequest, runtime: Util.RuntimeOptions): Query400RealNameListResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['PageNo'] = request.pageNo;
  query['PageSize'] = request.pageSize;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'Query400RealNameList',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function query400RealNameList(request: Query400RealNameListRequest): Query400RealNameListResponse {
  var runtime = new Util.RuntimeOptions{};
  return query400RealNameListWithOptions(request, runtime);
}

model Query400SpecsRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model Query400SpecsResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model Query400SpecsResponse = {
  headers: map[string]string(name='headers'),
  body: Query400SpecsResponseBody(name='body'),
}

async function query400SpecsWithOptions(request: Query400SpecsRequest, runtime: Util.RuntimeOptions): Query400SpecsResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'Query400Specs',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function query400Specs(request: Query400SpecsRequest): Query400SpecsResponse {
  var runtime = new Util.RuntimeOptions{};
  return query400SpecsWithOptions(request, runtime);
}

model QueryAccountByNameRequest {
  accountName?: string(name='AccountName'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryAccountByNameResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryAccountByNameResponse = {
  headers: map[string]string(name='headers'),
  body: QueryAccountByNameResponseBody(name='body'),
}

async function queryAccountByNameWithOptions(request: QueryAccountByNameRequest, runtime: Util.RuntimeOptions): QueryAccountByNameResponse {
  Util.validateModel(request);
  var query = {};
  query['AccountName'] = request.accountName;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryAccountByName',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryAccountByName(request: QueryAccountByNameRequest): QueryAccountByNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAccountByNameWithOptions(request, runtime);
}

model QueryAccountListRequest {
  accountName?: string(name='AccountName'),
  ownerId?: long(name='OwnerId'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryAccountListResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryAccountListResponse = {
  headers: map[string]string(name='headers'),
  body: QueryAccountListResponseBody(name='body'),
}

async function queryAccountListWithOptions(request: QueryAccountListRequest, runtime: Util.RuntimeOptions): QueryAccountListResponse {
  Util.validateModel(request);
  var query = {};
  query['AccountName'] = request.accountName;
  query['OwnerId'] = request.ownerId;
  query['PageNo'] = request.pageNo;
  query['PageSize'] = request.pageSize;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryAccountList',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryAccountList(request: QueryAccountListRequest): QueryAccountListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAccountListWithOptions(request, runtime);
}

model QueryAiccsInstanceListRequest {
  buyStatus?: long(name='BuyStatus'),
  instanceCode?: string(name='InstanceCode'),
  instanceName?: string(name='InstanceName'),
  ownerId?: long(name='OwnerId'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryAiccsInstanceListResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryAiccsInstanceListResponse = {
  headers: map[string]string(name='headers'),
  body: QueryAiccsInstanceListResponseBody(name='body'),
}

async function queryAiccsInstanceListWithOptions(request: QueryAiccsInstanceListRequest, runtime: Util.RuntimeOptions): QueryAiccsInstanceListResponse {
  Util.validateModel(request);
  var query = {};
  query['BuyStatus'] = request.buyStatus;
  query['InstanceCode'] = request.instanceCode;
  query['InstanceName'] = request.instanceName;
  query['OwnerId'] = request.ownerId;
  query['PageNo'] = request.pageNo;
  query['PageSize'] = request.pageSize;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryAiccsInstanceList',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryAiccsInstanceList(request: QueryAiccsInstanceListRequest): QueryAiccsInstanceListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAiccsInstanceListWithOptions(request, runtime);
}

model QueryAiccsInstanceOrderListRequest {
  instanceId?: long(name='InstanceId'),
  ownerId?: long(name='OwnerId'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryAiccsInstanceOrderListResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryAiccsInstanceOrderListResponse = {
  headers: map[string]string(name='headers'),
  body: QueryAiccsInstanceOrderListResponseBody(name='body'),
}

async function queryAiccsInstanceOrderListWithOptions(request: QueryAiccsInstanceOrderListRequest, runtime: Util.RuntimeOptions): QueryAiccsInstanceOrderListResponse {
  Util.validateModel(request);
  var query = {};
  query['InstanceId'] = request.instanceId;
  query['OwnerId'] = request.ownerId;
  query['PageNo'] = request.pageNo;
  query['PageSize'] = request.pageSize;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryAiccsInstanceOrderList',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryAiccsInstanceOrderList(request: QueryAiccsInstanceOrderListRequest): QueryAiccsInstanceOrderListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAiccsInstanceOrderListWithOptions(request, runtime);
}

model QueryAiccsInstancesRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryAiccsInstancesResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryAiccsInstancesResponse = {
  headers: map[string]string(name='headers'),
  body: QueryAiccsInstancesResponseBody(name='body'),
}

async function queryAiccsInstancesWithOptions(request: QueryAiccsInstancesRequest, runtime: Util.RuntimeOptions): QueryAiccsInstancesResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryAiccsInstances',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryAiccsInstances(request: QueryAiccsInstancesRequest): QueryAiccsInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAiccsInstancesWithOptions(request, runtime);
}

model QueryAllAccountListRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryAllAccountListResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryAllAccountListResponse = {
  headers: map[string]string(name='headers'),
  body: QueryAllAccountListResponseBody(name='body'),
}

async function queryAllAccountListWithOptions(request: QueryAllAccountListRequest, runtime: Util.RuntimeOptions): QueryAllAccountListResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryAllAccountList',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryAllAccountList(request: QueryAllAccountListRequest): QueryAllAccountListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAllAccountListWithOptions(request, runtime);
}

model QueryCallCostDetailRequest {
  billCycle?: string(name='BillCycle'),
  itemId?: string(name='ItemId'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  subjectItemId?: string(name='SubjectItemId'),
}

model QueryCallCostDetailResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryCallCostDetailResponse = {
  headers: map[string]string(name='headers'),
  body: QueryCallCostDetailResponseBody(name='body'),
}

async function queryCallCostDetailWithOptions(request: QueryCallCostDetailRequest, runtime: Util.RuntimeOptions): QueryCallCostDetailResponse {
  Util.validateModel(request);
  var query = {};
  query['BillCycle'] = request.billCycle;
  query['ItemId'] = request.itemId;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SubjectItemId'] = request.subjectItemId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryCallCostDetail',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryCallCostDetail(request: QueryCallCostDetailRequest): QueryCallCostDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCallCostDetailWithOptions(request, runtime);
}

model QueryCallCostListRequest {
  billCycle?: string(name='BillCycle'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryCallCostListResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryCallCostListResponse = {
  headers: map[string]string(name='headers'),
  body: QueryCallCostListResponseBody(name='body'),
}

async function queryCallCostListWithOptions(request: QueryCallCostListRequest, runtime: Util.RuntimeOptions): QueryCallCostListResponse {
  Util.validateModel(request);
  var query = {};
  query['BillCycle'] = request.billCycle;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryCallCostList',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryCallCostList(request: QueryCallCostListRequest): QueryCallCostListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCallCostListWithOptions(request, runtime);
}

model QueryCorpListBySceneRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  sceneId?: long(name='SceneId'),
}

model QueryCorpListBySceneResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryCorpListBySceneResponse = {
  headers: map[string]string(name='headers'),
  body: QueryCorpListBySceneResponseBody(name='body'),
}

async function queryCorpListBySceneWithOptions(request: QueryCorpListBySceneRequest, runtime: Util.RuntimeOptions): QueryCorpListBySceneResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SceneId'] = request.sceneId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryCorpListByScene',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryCorpListByScene(request: QueryCorpListBySceneRequest): QueryCorpListBySceneResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCorpListBySceneWithOptions(request, runtime);
}

model QueryCorpNameListByPageRequest {
  ownerId?: long(name='OwnerId'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryCorpNameListByPageResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryCorpNameListByPageResponse = {
  headers: map[string]string(name='headers'),
  body: QueryCorpNameListByPageResponseBody(name='body'),
}

async function queryCorpNameListByPageWithOptions(request: QueryCorpNameListByPageRequest, runtime: Util.RuntimeOptions): QueryCorpNameListByPageResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['PageNo'] = request.pageNo;
  query['PageSize'] = request.pageSize;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryCorpNameListByPage',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryCorpNameListByPage(request: QueryCorpNameListByPageRequest): QueryCorpNameListByPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCorpNameListByPageWithOptions(request, runtime);
}

model QueryCorpNameListFor400Request {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryCorpNameListFor400ResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryCorpNameListFor400Response = {
  headers: map[string]string(name='headers'),
  body: QueryCorpNameListFor400ResponseBody(name='body'),
}

async function queryCorpNameListFor400WithOptions(request: QueryCorpNameListFor400Request, runtime: Util.RuntimeOptions): QueryCorpNameListFor400Response {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryCorpNameListFor400',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryCorpNameListFor400(request: QueryCorpNameListFor400Request): QueryCorpNameListFor400Response {
  var runtime = new Util.RuntimeOptions{};
  return queryCorpNameListFor400WithOptions(request, runtime);
}

model QueryCorpsSpecsRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  qualificationType?: int32(name='QualificationType'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryCorpsSpecsResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryCorpsSpecsResponse = {
  headers: map[string]string(name='headers'),
  body: QueryCorpsSpecsResponseBody(name='body'),
}

async function queryCorpsSpecsWithOptions(request: QueryCorpsSpecsRequest, runtime: Util.RuntimeOptions): QueryCorpsSpecsResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['QualificationType'] = request.qualificationType;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryCorpsSpecs',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryCorpsSpecs(request: QueryCorpsSpecsRequest): QueryCorpsSpecsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCorpsSpecsWithOptions(request, runtime);
}

model QueryDownloadQualificationsRequest {
  fileName?: string(name='FileName'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryDownloadQualificationsResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryDownloadQualificationsResponse = {
  headers: map[string]string(name='headers'),
  body: QueryDownloadQualificationsResponseBody(name='body'),
}

async function queryDownloadQualificationsWithOptions(request: QueryDownloadQualificationsRequest, runtime: Util.RuntimeOptions): QueryDownloadQualificationsResponse {
  Util.validateModel(request);
  var query = {};
  query['FileName'] = request.fileName;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryDownloadQualifications',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryDownloadQualifications(request: QueryDownloadQualificationsRequest): QueryDownloadQualificationsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryDownloadQualificationsWithOptions(request, runtime);
}

model QueryEntryRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryEntryResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryEntryResponse = {
  headers: map[string]string(name='headers'),
  body: QueryEntryResponseBody(name='body'),
}

async function queryEntryWithOptions(request: QueryEntryRequest, runtime: Util.RuntimeOptions): QueryEntryResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryEntry',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryEntry(request: QueryEntryRequest): QueryEntryResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryEntryWithOptions(request, runtime);
}

model QueryOrdered400NumberListRequest {
  corpName?: string(name='CorpName'),
  month?: string(name='Month'),
  number?: string(name='Number'),
  ownerId?: long(name='OwnerId'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryOrdered400NumberListResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryOrdered400NumberListResponse = {
  headers: map[string]string(name='headers'),
  body: QueryOrdered400NumberListResponseBody(name='body'),
}

async function queryOrdered400NumberListWithOptions(request: QueryOrdered400NumberListRequest, runtime: Util.RuntimeOptions): QueryOrdered400NumberListResponse {
  Util.validateModel(request);
  var query = {};
  query['CorpName'] = request.corpName;
  query['Month'] = request.month;
  query['Number'] = request.number;
  query['OwnerId'] = request.ownerId;
  query['PageNo'] = request.pageNo;
  query['PageSize'] = request.pageSize;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrdered400NumberList',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryOrdered400NumberList(request: QueryOrdered400NumberListRequest): QueryOrdered400NumberListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrdered400NumberListWithOptions(request, runtime);
}

model QueryOrderedNumberListRequest {
  city?: string(name='City'),
  corpName?: string(name='CorpName'),
  month?: string(name='Month'),
  number?: string(name='Number'),
  ownerId?: long(name='OwnerId'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  prodCode?: string(name='ProdCode'),
  province?: string(name='Province'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  usageId?: long(name='UsageId'),
}

model QueryOrderedNumberListResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryOrderedNumberListResponse = {
  headers: map[string]string(name='headers'),
  body: QueryOrderedNumberListResponseBody(name='body'),
}

async function queryOrderedNumberListWithOptions(request: QueryOrderedNumberListRequest, runtime: Util.RuntimeOptions): QueryOrderedNumberListResponse {
  Util.validateModel(request);
  var query = {};
  query['City'] = request.city;
  query['CorpName'] = request.corpName;
  query['Month'] = request.month;
  query['Number'] = request.number;
  query['OwnerId'] = request.ownerId;
  query['PageNo'] = request.pageNo;
  query['PageSize'] = request.pageSize;
  query['ProdCode'] = request.prodCode;
  query['Province'] = request.province;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['UsageId'] = request.usageId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderedNumberList',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryOrderedNumberList(request: QueryOrderedNumberListRequest): QueryOrderedNumberListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderedNumberListWithOptions(request, runtime);
}

model QueryQualificaitonCandinateRequest {
  callType?: int32(name='CallType'),
  corpName?: string(name='CorpName'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  sceneId?: long(name='SceneId'),
}

model QueryQualificaitonCandinateResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryQualificaitonCandinateResponse = {
  headers: map[string]string(name='headers'),
  body: QueryQualificaitonCandinateResponseBody(name='body'),
}

async function queryQualificaitonCandinateWithOptions(request: QueryQualificaitonCandinateRequest, runtime: Util.RuntimeOptions): QueryQualificaitonCandinateResponse {
  Util.validateModel(request);
  var query = {};
  query['CallType'] = request.callType;
  query['CorpName'] = request.corpName;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SceneId'] = request.sceneId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryQualificaitonCandinate',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryQualificaitonCandinate(request: QueryQualificaitonCandinateRequest): QueryQualificaitonCandinateResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryQualificaitonCandinateWithOptions(request, runtime);
}

model QueryQualificationAuditDetailRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryQualificationAuditDetailResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryQualificationAuditDetailResponse = {
  headers: map[string]string(name='headers'),
  body: QueryQualificationAuditDetailResponseBody(name='body'),
}

async function queryQualificationAuditDetailWithOptions(request: QueryQualificationAuditDetailRequest, runtime: Util.RuntimeOptions): QueryQualificationAuditDetailResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryQualificationAuditDetail',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryQualificationAuditDetail(request: QueryQualificationAuditDetailRequest): QueryQualificationAuditDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryQualificationAuditDetailWithOptions(request, runtime);
}

model QueryQualificationDetailRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryQualificationDetailResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryQualificationDetailResponse = {
  headers: map[string]string(name='headers'),
  body: QueryQualificationDetailResponseBody(name='body'),
}

async function queryQualificationDetailWithOptions(request: QueryQualificationDetailRequest, runtime: Util.RuntimeOptions): QueryQualificationDetailResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryQualificationDetail',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryQualificationDetail(request: QueryQualificationDetailRequest): QueryQualificationDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryQualificationDetailWithOptions(request, runtime);
}

model QueryQualificationListRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryQualificationListResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryQualificationListResponse = {
  headers: map[string]string(name='headers'),
  body: QueryQualificationListResponseBody(name='body'),
}

async function queryQualificationListWithOptions(request: QueryQualificationListRequest, runtime: Util.RuntimeOptions): QueryQualificationListResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryQualificationList',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryQualificationList(request: QueryQualificationListRequest): QueryQualificationListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryQualificationListWithOptions(request, runtime);
}

model QueryRandomResRequest {
  city?: string(name='City'),
  isCuteNumber?: boolean(name='IsCuteNumber'),
  levelId?: long(name='LevelId'),
  numberCount?: int32(name='NumberCount'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  province?: string(name='Province'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  specId?: long(name='SpecId'),
}

model QueryRandomResResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryRandomResResponse = {
  headers: map[string]string(name='headers'),
  body: QueryRandomResResponseBody(name='body'),
}

async function queryRandomResWithOptions(request: QueryRandomResRequest, runtime: Util.RuntimeOptions): QueryRandomResResponse {
  Util.validateModel(request);
  var query = {};
  query['City'] = request.city;
  query['IsCuteNumber'] = request.isCuteNumber;
  query['LevelId'] = request.levelId;
  query['NumberCount'] = request.numberCount;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['Province'] = request.province;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SpecId'] = request.specId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryRandomRes',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryRandomRes(request: QueryRandomResRequest): QueryRandomResResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryRandomResWithOptions(request, runtime);
}

model QueryRandomResFor400Request {
  levelId?: long(name='LevelId'),
  numberCount?: int32(name='NumberCount'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  specId?: long(name='SpecId'),
}

model QueryRandomResFor400ResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryRandomResFor400Response = {
  headers: map[string]string(name='headers'),
  body: QueryRandomResFor400ResponseBody(name='body'),
}

async function queryRandomResFor400WithOptions(request: QueryRandomResFor400Request, runtime: Util.RuntimeOptions): QueryRandomResFor400Response {
  Util.validateModel(request);
  var query = {};
  query['LevelId'] = request.levelId;
  query['NumberCount'] = request.numberCount;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SpecId'] = request.specId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryRandomResFor400',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryRandomResFor400(request: QueryRandomResFor400Request): QueryRandomResFor400Response {
  var runtime = new Util.RuntimeOptions{};
  return queryRandomResFor400WithOptions(request, runtime);
}

model QueryRealNameInfoByCorpNameRequest {
  corpName?: string(name='CorpName'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryRealNameInfoByCorpNameResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryRealNameInfoByCorpNameResponse = {
  headers: map[string]string(name='headers'),
  body: QueryRealNameInfoByCorpNameResponseBody(name='body'),
}

async function queryRealNameInfoByCorpNameWithOptions(request: QueryRealNameInfoByCorpNameRequest, runtime: Util.RuntimeOptions): QueryRealNameInfoByCorpNameResponse {
  Util.validateModel(request);
  var query = {};
  query['CorpName'] = request.corpName;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryRealNameInfoByCorpName',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryRealNameInfoByCorpName(request: QueryRealNameInfoByCorpNameRequest): QueryRealNameInfoByCorpNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryRealNameInfoByCorpNameWithOptions(request, runtime);
}

model QuerySceneByUsageRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  usageId?: long(name='UsageId'),
}

model QuerySceneByUsageResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QuerySceneByUsageResponse = {
  headers: map[string]string(name='headers'),
  body: QuerySceneByUsageResponseBody(name='body'),
}

async function querySceneByUsageWithOptions(request: QuerySceneByUsageRequest, runtime: Util.RuntimeOptions): QuerySceneByUsageResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['UsageId'] = request.usageId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QuerySceneByUsage',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function querySceneByUsage(request: QuerySceneByUsageRequest): QuerySceneByUsageResponse {
  var runtime = new Util.RuntimeOptions{};
  return querySceneByUsageWithOptions(request, runtime);
}

model QueryScenesSpecsRequest {
  corpName?: string(name='CorpName'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  sceneType?: int32(name='SceneType'),
  type?: int32(name='Type'),
  usageId?: long(name='UsageId'),
}

model QueryScenesSpecsResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryScenesSpecsResponse = {
  headers: map[string]string(name='headers'),
  body: QueryScenesSpecsResponseBody(name='body'),
}

async function queryScenesSpecsWithOptions(request: QueryScenesSpecsRequest, runtime: Util.RuntimeOptions): QueryScenesSpecsResponse {
  Util.validateModel(request);
  var query = {};
  query['CorpName'] = request.corpName;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SceneType'] = request.sceneType;
  query['Type'] = request.type;
  query['UsageId'] = request.usageId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryScenesSpecs',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryScenesSpecs(request: QueryScenesSpecsRequest): QueryScenesSpecsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryScenesSpecsWithOptions(request, runtime);
}

model QuerySpecRegionByCorpNameRequest {
  corpName?: string(name='CorpName'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QuerySpecRegionByCorpNameResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QuerySpecRegionByCorpNameResponse = {
  headers: map[string]string(name='headers'),
  body: QuerySpecRegionByCorpNameResponseBody(name='body'),
}

async function querySpecRegionByCorpNameWithOptions(request: QuerySpecRegionByCorpNameRequest, runtime: Util.RuntimeOptions): QuerySpecRegionByCorpNameResponse {
  Util.validateModel(request);
  var query = {};
  query['CorpName'] = request.corpName;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QuerySpecRegionByCorpName',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function querySpecRegionByCorpName(request: QuerySpecRegionByCorpNameRequest): QuerySpecRegionByCorpNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return querySpecRegionByCorpNameWithOptions(request, runtime);
}

model QuerySpecRegionListRequest {
  callType?: int32(name='CallType'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  sceneId?: long(name='SceneId'),
  specId?: long(name='SpecId'),
}

model QuerySpecRegionListResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QuerySpecRegionListResponse = {
  headers: map[string]string(name='headers'),
  body: QuerySpecRegionListResponseBody(name='body'),
}

async function querySpecRegionListWithOptions(request: QuerySpecRegionListRequest, runtime: Util.RuntimeOptions): QuerySpecRegionListResponse {
  Util.validateModel(request);
  var query = {};
  query['CallType'] = request.callType;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SceneId'] = request.sceneId;
  query['SpecId'] = request.specId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QuerySpecRegionList',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function querySpecRegionList(request: QuerySpecRegionListRequest): QuerySpecRegionListResponse {
  var runtime = new Util.RuntimeOptions{};
  return querySpecRegionListWithOptions(request, runtime);
}

model QueryUpgradeNumberAuditRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  realNameInsId?: long(name='RealNameInsId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryUpgradeNumberAuditResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryUpgradeNumberAuditResponse = {
  headers: map[string]string(name='headers'),
  body: QueryUpgradeNumberAuditResponseBody(name='body'),
}

async function queryUpgradeNumberAuditWithOptions(request: QueryUpgradeNumberAuditRequest, runtime: Util.RuntimeOptions): QueryUpgradeNumberAuditResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['RealNameInsId'] = request.realNameInsId;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryUpgradeNumberAudit',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryUpgradeNumberAudit(request: QueryUpgradeNumberAuditRequest): QueryUpgradeNumberAuditResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUpgradeNumberAuditWithOptions(request, runtime);
}

model QueryUsagesRequest {
  corpName?: string(name='CorpName'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  type?: int32(name='Type'),
}

model QueryUsagesResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryUsagesResponse = {
  headers: map[string]string(name='headers'),
  body: QueryUsagesResponseBody(name='body'),
}

async function queryUsagesWithOptions(request: QueryUsagesRequest, runtime: Util.RuntimeOptions): QueryUsagesResponse {
  Util.validateModel(request);
  var query = {};
  query['CorpName'] = request.corpName;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['Type'] = request.type;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryUsages',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryUsages(request: QueryUsagesRequest): QueryUsagesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUsagesWithOptions(request, runtime);
}

model QueryVoiceNumberStockCountRequest {
  city?: string(name='City'),
  numberType?: int32(name='NumberType'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  province?: string(name='Province'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  specIds?: string(name='SpecIds'),
}

model QueryVoiceNumberStockCountResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model QueryVoiceNumberStockCountResponse = {
  headers: map[string]string(name='headers'),
  body: QueryVoiceNumberStockCountResponseBody(name='body'),
}

async function queryVoiceNumberStockCountWithOptions(request: QueryVoiceNumberStockCountRequest, runtime: Util.RuntimeOptions): QueryVoiceNumberStockCountResponse {
  Util.validateModel(request);
  var query = {};
  query['City'] = request.city;
  query['NumberType'] = request.numberType;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['Province'] = request.province;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['SpecIds'] = request.specIds;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryVoiceNumberStockCount',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryVoiceNumberStockCount(request: QueryVoiceNumberStockCountRequest): QueryVoiceNumberStockCountResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryVoiceNumberStockCountWithOptions(request, runtime);
}

model SetPasswordRequest {
  newPassword?: string(name='NewPassword'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resetRequired?: boolean(name='ResetRequired'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  userName?: string(name='UserName'),
}

model SetPasswordResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model SetPasswordResponse = {
  headers: map[string]string(name='headers'),
  body: SetPasswordResponseBody(name='body'),
}

async function setPasswordWithOptions(request: SetPasswordRequest, runtime: Util.RuntimeOptions): SetPasswordResponse {
  Util.validateModel(request);
  var query = {};
  query['NewPassword'] = request.newPassword;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResetRequired'] = request.resetRequired;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  query['UserName'] = request.userName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'SetPassword',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setPassword(request: SetPasswordRequest): SetPasswordResponse {
  var runtime = new Util.RuntimeOptions{};
  return setPasswordWithOptions(request, runtime);
}

model TransferToThirdCallRequest {
  accountName?: string(name='AccountName'),
  callId?: string(name='CallId'),
  clientToken?: string(name='ClientToken'),
  connectionId?: string(name='ConnectionId'),
  holdConnectionId?: string(name='HoldConnectionId'),
  instanceId?: string(name='InstanceId'),
  jobId?: string(name='JobId'),
}

model TransferToThirdCallResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model TransferToThirdCallResponse = {
  headers: map[string]string(name='headers'),
  body: TransferToThirdCallResponseBody(name='body'),
}

async function transferToThirdCallWithOptions(request: TransferToThirdCallRequest, runtime: Util.RuntimeOptions): TransferToThirdCallResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'TransferToThirdCall',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function transferToThirdCall(request: TransferToThirdCallRequest): TransferToThirdCallResponse {
  var runtime = new Util.RuntimeOptions{};
  return transferToThirdCallWithOptions(request, runtime);
}

model UploadFileRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model UploadFileResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model UploadFileResponse = {
  headers: map[string]string(name='headers'),
  body: UploadFileResponseBody(name='body'),
}

async function uploadFileWithOptions(request: UploadFileRequest, runtime: Util.RuntimeOptions): UploadFileResponse {
  Util.validateModel(request);
  var query = {};
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'UploadFile',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function uploadFile(request: UploadFileRequest): UploadFileResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadFileWithOptions(request, runtime);
}

model UploadFileToWttRequest {
  fileName?: string(name='FileName'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model UploadFileToWttResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model UploadFileToWttResponse = {
  headers: map[string]string(name='headers'),
  body: UploadFileToWttResponseBody(name='body'),
}

async function uploadFileToWttWithOptions(request: UploadFileToWttRequest, runtime: Util.RuntimeOptions): UploadFileToWttResponse {
  Util.validateModel(request);
  var query = {};
  query['FileName'] = request.fileName;
  query['OwnerId'] = request.ownerId;
  query['ProdCode'] = request.prodCode;
  query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  query['ResourceOwnerId'] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'UploadFileToWtt',
    version = '2019-07-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function uploadFileToWtt(request: UploadFileToWttRequest): UploadFileToWttResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadFileToWttWithOptions(request, runtime);
}

